<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?php echo Yii::$app->name;?> 后台管理</title>
<?php $this->HeaderView();?>
</head>
<body class="view_index" id="view_index_Type">
<div class="view-index-nav">
        <h3>模型管理</h3>
  <p class="tips">
        分类增、删、改、排序后需要<strong style="color:#F00">更新缓存</strong>方可生效。
        </p>
</div>
<div class="pt-20 padding-0-20 hiddene">
                    <div class="slideTxtBox mtop-0">
        <div class="hd">
                    <ul>
                
                <li><a href="javascript:;"><span></span>基础信息</a></li>
                <li><a href="<?php echo $this->createUrl(['mobo/models/create', 'type'=>$type]);?>"><span></span>添加内容</a></li>
            </ul>
                </div>
                </div>


</div>
<form class="view-index-form margin-10-20" method="post" action="<?php echo $this->createUrl('batch');?>" enctype="multipart/form-data">
<input type="hidden" class="input-text" id="_csrf" name="_csrf" value="<?php echo Yii::$app->request->csrfToken;?>">
<table class="view-index-list" border="0" cellspacing="0" cellpadding="0" width="100%">
    <thead>
        <tr>
          <th class="th-select" width="30">选择</th>
          <th width="40">ID</th>
                        <th>模型名称</th>
                        <th>数据库表名</th>
                        <th>主界面配置</th>
                        <th width="100">自定义字段</th>
                        
            <th class="edit norightborder">操作</th>
        </tr>
    </thead>
    <tbody>
        <?php
    foreach($models as $k=>$v){
    ?>
    <tr>
              <td><input type="checkbox" value="<?php echo $v['modelid'];?>" name="checked_catid[]"/></td>
        <td><?php echo $v['modelid'];?></td>
        <td><a href="<?php echo $this->createUrl(['mobo/models-form/index', 'modelid'=>$v['modelid']])?>"><?php echo $v['name'];?></a></td>
                
        <td><?php echo $v['tablename'];?></td>
        <td><?php echo $v['tablename'];?></td>
        <td><a href="<?php echo $this->createUrl(['mobo/models/field', 'modelid'=>$v['modelid']])?>" title="自定义字段">自定义字段</a></td>   
        
                <td class="td-operation">
            <a href="<?php echo $this->createUrl(['mobo/models/update','modelid'=>$v['modelid']])?>" title="编辑" class="operation-update">编辑</a> <a href="<?php echo $this->createUrl(['mobo/models/delete','modelid'=>$v['modelid']])?>" title="删除" class="operation-delete">删除</a></td>
        <?php
}
?>    </tr>
        </tbody>
    
</table>
<div class="view-index-batch">
<input type="checkbox" name="chkall" id="chkall" onclick="checkAll( this.form, 'id')">
<label for="chkall">全选</label>
<input id="submit_maskall" class="button confirmSubmit" type="submit" value="批量删除" name="batch_delete" onclick="return batch_delete(this);">
</div>
</form>
<div class="pages">
<?=$this->linkPager($pages)?>
</div>
<?php $this->FooterView();?>
</body>
</html>